package com.study.web.dao.sysparams.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.study.common.base.dao.BaseDaoImpl;
import com.study.common.exception.BizException;
import com.study.common.page.PageBean;
import com.study.common.page.PageParam;
import com.study.web.dao.sysparams.SysParamsDao;
import com.study.web.entity.SysParams;

/**
 * SysParamsDaoImpl.java
 * @author yaojinshan
 * @since 2018年6月14日下午2:45:03
 */
@Repository("sysParamsDao")
public class SysParamsDaoImpl extends BaseDaoImpl<SysParams>implements SysParamsDao {

	public PageBean getListData(PageParam pageParam, Map<String, Object> paramMap) throws BizException {
		return listPage(pageParam, paramMap, "getListData");
	}

	public Long saveAddPageData(SysParams sysParams) throws BizException {
		return insert(sysParams);
	}

	public Long saveUpdatePageData(SysParams sysParams) throws BizException {
		return update(sysParams);
	}

	public Long batchDeleteData(List<SysParams> entityList) throws BizException {
		return (long) getSessionTemplate().delete("batchDeleteData", entityList);
	}

	public List<SysParams> getAllDataList(Map<String, Object> paramMap) throws BizException {
		String sqlId="getAllDataList";
        List<SysParams> list = getSessionTemplate().selectList(sqlId, paramMap);
        if(list!=null&&list.size()>0){
            return list;
        }
		return null;
	}
	

}
